﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GnufValueInput.h"

namespace gnuf {
    class Info;

    class GNUF_BASE_EXPORT ValueInputGroup : public ValueInputBase
    {
        DEFINE_CAST_DERIVED(gnuf::ValueInputGroup, gnuf::ValueInputBase)
    public:
        explicit ValueInputGroup(std::uint16_t, gcmp::OwnerPtr< Info > &);
        virtual ~ValueInputGroup();

        const Info * info() const { return m_info.get(); }
        
        void add(gcmp::OwnerPtr< ValueInputBase > &);
        
        typedef std::list< gcmp::OwnerPtr< ValueInputBase > > Contents;
        inline const ValueInputGroup::Contents & contents() const { return m_contents; }
        
        inline std::vector< ValueInputBase *> rawContents();
        
    private:
        gcmp::OwnerPtr< Info > m_info;
        ValueInputGroup::Contents m_contents;
    };

}
